<script setup>
import { getCurrentInstance, ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'

const currentInstance = getCurrentInstance()//获取当前实例
const list = ref([1, 2, 3])
const params = ref()
onLoad((option) => {    //这里可以接收到一个参数option
    params.value = option
    console.log(params.value)
})

</script>

<template>
    <view>
        <view style="margin-bottom: 100rpx;">
            <u-navbar @rightClick="rightClick()" :autoBack="true" :safeAreaInsetTop="false" :border="false"
                leftIconColor="#017BF6" bgColor="#F7F7F7" height="80rpx" titleWidth="100%">
                <template #center style="font-weight: bolder;">
                    建设信息(查询结果:共{{ list.length }}条记录)
                </template>
            </u-navbar>

        </view>
        <view class="information" v-for="(item, index) in  list " :key="index">
            <view class="title">
                电站名称：<text>{{ item }}</text>
            </view>
            <view class="title">
                所属区县：<text>{{ item }}</text>
            </view>
            <view class="title">
                所属乡镇：<text>{{ item }}</text>
            </view>
            <view class="title">
                建设阶段：<text>{{ item }}</text>
            </view>
            <view class="title">
                建设描述：<text>{{ item }}</text>
            </view>
            <view class="title">
                现场图片：
                <view v-for="(item, index) in site" :key="index">
                    <image :mode="aspectFit" :src="src">
                    </image>
                </view>
            </view>
            <view class="title">
                填写人：<text>{{ item }}</text>
            </view>
            <view class="title">
                填写日期：<text>{{ item }}</text>
            </view>
        </view>
    </view>
</template>

<style lang="scss">
body {
    background-color: #F0EFF4;
}

text {
    font-weight: bold;
}

.information {
    width: 700rpx;
    height: auto;
    background-color: #fff;
    padding: 25rpx;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 25rpx 5rpx 20rpx 25rpx;
}

.title {
    margin: 10rpx 0 15rpx 10rpx;
    font-size: 25rpx;
    color: #000;
}
</style>
